class HealthCheckEntity {
  List<HealthCheckInfo>? listDetail;
  String? ownerName;
  int? examinationRecordId;
  int? customerId;
  HealthCheckEntity({
    this.listDetail,
    this.ownerName,
    this.examinationRecordId,
    this.customerId,
  });

  factory HealthCheckEntity.fromJson(Map<String, dynamic> json) {
    final originList = json['listDetail'] as List?;
    List<HealthCheckInfo> protocolList =
        (originList??[]).map((value) => HealthCheckInfo.fromJson(value)).toList();
    return HealthCheckEntity(
      listDetail: protocolList,
      ownerName: json['ownerName'],
      examinationRecordId :json['examinationRecordId'],
      customerId: json['customerId'],
    );
  }
}

class HealthCheckInfo {
  String? itemName;
  String? examinationStatusName;
  String? examinationStatus;
  int? id;
  List<HealthCheckFileInfo>? file;

  HealthCheckInfo({
    this.itemName,
    this.examinationStatusName,
    this.examinationStatus,
    this.file,
    this.id,
  });

  factory HealthCheckInfo.fromJson(Map<String, dynamic> json) {
    final originList = json['file'] as List?;
    List<HealthCheckFileInfo> protocolList =
        (originList??[]).map((value) => HealthCheckFileInfo.fromJson(value)).toList();

    return HealthCheckInfo(
      file: protocolList,
      itemName: json['itemName'],
      id :json['id'],
      examinationStatus: json['examinationStatus'],
      examinationStatusName: json['examinationStatusName'],
    );
  }
}

class HealthCheckFileInfo {
  int? fileId;
  int? id;

  HealthCheckFileInfo({
    this.fileId,
    this.id,
  });

  HealthCheckFileInfo.fromJson(Map data) {
    fileId = data['fileId'];
    id = data['id'];
  }
}
